<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改数据配置')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-map-edit" th:object="${haodeDataMap}">
            <input name="dataMapId" th:field="*{dataMapId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">数据名称：</label>
                <div class="col-sm-8">
                    <input name="mapTitle" th:field="*{mapTitle}" class="form-control" type="text">
                    <br/>所有数据统计项，如需两个社区统计到一个参数，只需要将名字设置为一致
                    <br/>如【德化县医院心电图室】 【德化县医院内三科】社区都归类到【医院德化县医院】
                    <br/>那数据名称就是【医院德化县医院】
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经纬度：</label>
                <div class="col-sm-8">
                    <input name="mapLnglat" th:field="*{mapLnglat}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control" th:with="type=${@dict.getType('haode_show')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">数据介绍：</label>
                <div class="col-sm-8">
                    <input name="mapContent" th:field="*{mapContent}" class="form-control" type="text">
                    <br/>填入后会展示在地图标志的详情
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">具体地址：</label>
                <div class="col-sm-8">
                    <input name="mapAddress" th:field="*{mapAddress}" class="form-control" type="text">
                    <br/>填入后保存,如经纬度无值会自动更新经纬度(需联网)
                    <br/>地址如【泉州市鲤城区东街250号】
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">绑定的社区名称：</label>
                <div class="col-sm-8">
                    <input name="mapStrName" th:field="*{mapStrName}" class="form-control" type="text" readonly>
                </div>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
            </button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
            </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/map";
        $("#form-map-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/edit", $('#form-map-edit').serialize());
            }
        }
    </script>
</body>
</html>